package com.bz.xtcx.manager.mapper;

import com.bz.xtcx.manager.entity.LibCodeSequence;
import com.bz.xtcx.manager.mapper.provider.LibCodeSequenceProvider;
import com.bz.xtcx.manager.vo.VoQuery;
import org.apache.ibatis.annotations.*;

public interface LibCodeSequenceMapper {

	@SelectProvider(type = LibCodeSequenceProvider.class, method = "findCodeByPrefixProvider")
    int findCodeByPrefix(String pf);

    @Select("select prefix, prefix_value, value, step from `lib_code_sequence` where prefix = #{pf}")
    @Results(
        id = "libCollege",
        value = {
            @Result(property = "prefix", column = "prefix"),
            @Result(property = "prefixValue", column = "prefix_value"),
            @Result(property = "value", column = "value"),
            @Result(property = "step", column = "step")
        }
    )
    LibCodeSequence findByPrefix(String pf);
}
